var b = 2
function foo() {
    let a = 1
    function bar() {
        console.log(a);
        
        console.log(b);
    }
    
    return bar
}

const baz = foo()
baz()